<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>狗洋记账</title>
    <script src="js/jquery-3.5.1.min.js"></script>
    <script src="js/timeNow.js"></script>
    <script src="js/menu.js"></script>
    <script src="js/prefix.js"></script>
    <script src="js/welcome.js"></script>
    <link rel="stylesheet" href="css/index.css">
    <link rel="stylesheet" href="css/menu.css">
    <script>
        $(function () {
            getUserName();
        });
        function showPage() {
            window.location="show.html";
        }
        function managePage() {
            window.location="manage.html";
        }
        function feedbackPage() {
            window.location="feedback.html";
        }
        function getUserName() {
            $.ajax({
                url:URL_PREFIX+"/user/getUserNameByCurrentIp",
                type:"get",
                async:false,
                statusCode:{
                    200:function (data) {
                        if(data==""){
                            $("#loginfirst").html("请先<a href='login.html' id='login-a'>登录</a>");
                            $("#logout-a").hide();
                        }else{
                            $("#loginfirst").html(data);
                            $("#logout-a").show();
                        }
                    }
                }
            })
        }
    </script>
</head>
<body>
<div id="top">
    <span>推荐使用PC端访问本网站。推荐使用的浏览器：Google&nbsp;Chrome、QQ&nbsp;Browser；暂不推荐：Microsoft&nbsp;Edge，Safari</span>
</div>
<div id="menu"></div>
<div class="top">
    <h2>Welcome!</h2>
    <h3 id="time"></h3>
    <h2>狗洋记账</h2>
    <p>您好，<span id="loginfirst"></span></p>
    <p><a href="javascript:logout()" id="logout-a">退出登录</a></p>
</div>
<div class="main">
    <div class="up">
        <input type="button" value="我要管理支出" class="btn" title="新增支出，或对已有数据进行修改等操作" onclick="managePage()">
    </div>

    <div class="center">
        <input type="button" value="我要查看图形化数据" class="btn" title="更直观的查看支出的大概走势或主要构成" onclick="showPage()">
    </div>
    <div class="down">
        <input type="button" value="我要提建议" class="btn btn-fe" title="给狗洋记账反馈和建议" onclick="feedbackPage()">
    </div>

</div>

</body>
</html>